// @ts-ignore
/* eslint-disable */
import { OpenApi as request } from "@/utils/request";

/** 分店分页 GET /platform/shop */
export async function listPage7(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.listPage7Params,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponsePageRespPlatformShopAccountVo>(
    `/barter-user/platform/shop`,
    {
      method: "GET",
      params: {
        ...params,
      },
      ...(options || {}),
    }
  );
}

/** 新增分店 POST /platform/shop */
export async function add7(
  body: API.PlatformShopAccountDto,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean>(`/barter-user/platform/shop`, {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 分店详情 GET /platform/shop/${param0} */
export async function detail9(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.detail9Params,
  options?: { [key: string]: any }
) {
  const { id: param0, ...queryParams } = params;
  return request<API.BaseResponsePlatformShopAccountVo>(
    `/barter-user/platform/shop/${param0}`,
    {
      method: "GET",
      params: { ...queryParams },
      ...(options || {}),
    }
  );
}

/** 编辑分店 PUT /platform/shop/${param0} */
export async function edit3(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.edit3Params,
  body: API.PlatformShopAccountDto,
  options?: { [key: string]: any }
) {
  const { id: param0, ...queryParams } = params;
  return request<API.BaseResponseBoolean>(
    `/barter-user/platform/shop/${param0}`,
    {
      method: "PUT",
      headers: {
        "Content-Type": "application/json",
      },
      params: { ...queryParams },
      data: body,
      ...(options || {}),
    }
  );
}

/** 删除分店 DELETE /platform/shop/${param0} */
export async function del11(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.del11Params,
  options?: { [key: string]: any }
) {
  const { id: param0, ...queryParams } = params;
  return request<API.BaseResponseBoolean>(
    `/barter-user/platform/shop/${param0}`,
    {
      method: "DELETE",
      params: { ...queryParams },
      ...(options || {}),
    }
  );
}

/** 分店审核 PUT /platform/shop/audit/${param0} */
export async function audit(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.auditParams,
  body: API.PlatformShopAccountAuditDto,
  options?: { [key: string]: any }
) {
  const { id: param0, ...queryParams } = params;
  return request<API.BaseResponseBoolean>(
    `/barter-user/platform/shop/audit/${param0}`,
    {
      method: "PUT",
      headers: {
        "Content-Type": "application/json",
      },
      params: { ...queryParams },
      data: body,
      ...(options || {}),
    }
  );
}

/** 状态切换 POST /platform/shop/disable */
export async function disable3(
  body: API.IdDto,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean>(
    `/barter-user/platform/shop/disable`,
    {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    }
  );
}

/** 添加储值 POST /platform/shop/wallet/balance */
export async function addWalletBalance1(
  body: API.PlatformShopWalletBalanceAddDto,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean>(
    `/barter-user/platform/shop/wallet/balance`,
    {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    }
  );
}

/** 储值明细分页 GET /platform/shop/wallet/history */
export async function listWalletHistoryPage1(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.listWalletHistoryPage1Params,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponsePageRespPlatformShopWalletChangeHistoryVo>(
    `/barter-user/platform/shop/wallet/history`,
    {
      method: "GET",
      params: {
        ...params,
      },
      ...(options || {}),
    }
  );
}
